#ifndef VERTEX_OBJECT_H
#define VERTEX_OBJECT_H

#include <QOpenGLFunctions>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>
#include <QDebug>
#include "texture_shader_program.h"

class VertexObject : protected QOpenGLFunctions {
    public:
        explicit VertexObject(ShaderProgram *program);
        ~VertexObject();

    public:
        virtual void draw(QMatrix4x4 &modelViewProjectM) = 0;

    protected:
        ShaderProgram *m_program = nullptr;
        QOpenGLVertexArrayObject *m_vao = nullptr;
        QOpenGLBuffer *m_vbo = nullptr;

    private:
        void init();
};
#endif // VERTEX_OBJECT_H
